package com.cn.jx.manager.po;

import com.cn.jx.common.entity.BaseIdEntity;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * <p>RoleResource 角色资源中间关联表POJO类 对应数据库表名 SYS_ROLE_RESOURCE
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseIdEntity <tt>BaseIdEntity</tt>}
 *  
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_ROLE_RESOURCE")
public class RoleResource  extends BaseIdEntity {

	private static final long serialVersionUID = -1114882833370697211L;
	
	/** <p>角色id<p>设置为{@link String String}类型*/
	@Column(name="role_id",length=64)
	private String roleId;
	
	/** <p>资源ID<p>设置为{@link String String}类型*/
	@Column(name="resource_id",length=64)
	private String resourceId;
	
	/** <p>初始化创建类 @return */
	public static RoleResource getInstance(){
		RoleResource m=new RoleResource();
		m.setId(getRandomId());
		return m;
	}

	/** <p>{@link String String}<p>getRoleId()*/
	public String getRoleId() {
		return roleId;
	}
	/** <p>{@link String String}<p>getResourceId()*/
	public String getResourceId() {
		return resourceId;
	}

	/** <p>setRoleId({@link String roleId})*/
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	/** <p>setResourceId({@link String resourceId})*/
	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}
}
